package com.itmumu.miniwechat.common.constants;

/**
 * @author zhongzb create on 2021/06/10
 */
public class RedisKey {
    private static final String BASE_KEY = "minichat:";

    /**
     * 登录二维码ticket
     */
    public static final String LOGIN_TICKET = "login_ticket:";

    /**
     * 登录验证码
     */
    public static final String CHECK_CODE = "login_checkcode:";

    /**
     * 登录事件码
     */
    public static final String LOGIN_EVENT_CODE = "login_event_code:";

    /**
     * 登录用户
     */
    public static final String USER_HEART_BEAT = "ws:user:heartbeat";

    /**
     * 登录用户
     */
    public static final String WS_TOKEN = "ws:token:";

    public static final String WS_TOKEN_USERID = "ws:token:uid";

    public static final String REDIS_KEY_USER_CONTACT = "ws:user:contact:";


    public static String getKey(String key, Object... objects) {
        return BASE_KEY + String.format(key, objects);
    }

}
